<!--数据治理-成本概览页面-->
<template>
  <div>
    <div class="grid-content bg-purple"   style="font-size:19px;color:black;font-weight: bold;text-align: left">成本概览
      <el-row>
      <el-col :span="14">
      <div class="grid-content bg-purple" >
        <div style="font-size:15px;color:grey ">数 据 表  </div>
        <br>
        <div style="font-size:30px;" >{{tableCount}} <span style="font-size:10px">张</span></div>
        <br>
      </div>
      </el-col>
      <el-col :span="10">
      <div class="grid-content bg-purple"  >
        <div style="font-size:15px;color:grey">存 储 量  </div>
        <br>
        <div style="font-size:30px;" >{{globalSize}}</div>
        <br>
      </div>
      </el-col>
      </el-row>
    </div>

  </div>
</template>


<script>
import api from '@/api/govern/govern'
import tableInfoApi from '@/api/assets/tableInfo'
export default {
  data() {
    return {
      globalSize:0,
      activeUserTotal:0,
      newUserCount:0,
      newOrderUserCount:0,
      userChurn:0,
      userBack:0,
      tableCount:0
    }
  },

  mounted() {
    this.init()
  } ,
  methods: {
    init() {
     this.getGlobalSize()
      this.getTableCount()
    },
    getGlobalSize(){
      api.globalSize( ).then(response => {
        this.globalSize = response.data
      }).catch( response => {
        console.log('失败'+response)
        // Vue.$message.error('服务器错误，请稍后再试')
        //reject(response)
      })
    },
    getTableCount(){
      tableInfoApi.getQueryList( ).then(response => {
        this.tableCount = response.data.tableNameList.length
      }).catch( response => {
        console.log('失败'+response)
        // Vue.$message.error('服务器错误，请稍后再试')
        //reject(response)
      })
    }


  }
}
</script>

